<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/base/base.jsp"%>
<%@ include file="/base/database.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title>管理的班级信息</title>
<link rel="stylesheet" href="css/pintuer.css">
<link rel="stylesheet" href="css/admin.css">
<link rel="shortcut icon" href="images/logo.jpg">
<script src="js/jquery.js"></script>
<script src="js/pintuer.js"></script>

</head>

<body>

  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder">管理的班级信息</strong> </div>
    <div class="padding border-bottom">
      <ul class="search" style="padding-left:10px;">
       <form method="post" action="">
       <li style="color:blue;font-size:16px;">选择管理的班级：</li>
       	<select name="utype" onchange="window.location=this.value">
       	<option>选择班级</option>
       	<option value="class1_list.jsp">17软件工程5班</option>
       	<option value="class2_list.jsp">17软件工程6班</option>
       	</select> 
       </form>
			 
      </ul>
    </div>
    <table class="table table-hover text-center">
      <tr>
       			<th>序号</th>
       			<th>班号</th>
				<th>姓名</th>
				<th>二级学院编号</th>
				<th>专业</th>
				<th>年级</th>
				<th>操作</th>
      </tr>
    	
		
			<%  
				
					
			    request.setCharacterEncoding("utf-8");
			  
			    String  keyword=request.getParameter("keyword");
			    
			    StringBuffer sqlBuff = new StringBuffer();	    
			    	
				sqlBuff.append("select * from sys_class1 where 1=1");
				 
				String sql = sqlBuff.toString();			  	
			    
				Connection conn = getConn();
			
				PreparedStatement pstmt = conn.prepareStatement(sql);
		
				ResultSet rs = pstmt.executeQuery();
				
				int index = 1;
				while (rs.next()) {
					
				String classID=rs.getNString("classID");
				String className=rs.getNString("className");								
				String depID=rs.getNString("depID");			
				String major=rs.getNString("major");
				String grade=rs.getNString("grade");
			%>
			<tr>
				 <td><%=index++ %></td>
				<td><%=classID%></td>
				<td><%=className%></td>
				<td><%=depID %></td>
				<td><%=major%></td>
				<td><%=grade%></td>
				<td><div class="button-group">
				 <a class="button border-main" href="<%=path%>/page/student/student_edit.jsp?classID=<%=classID%>"><span class="icon-edit"></span> 修改</a> <a class="button border-red" href="<%=path%>/page/student/action_delstudent.jsp?classID=<%=classID%>" ><span class="icon-trash-o"></span> 删除</a>  </div></td>
			</tr>
			<%
				}	
		%>

    </table>
  </div>
</body>
</html>
